<script type="text/javascript">
function delmn(id)
{
	if(confirm("Bạn có chắc chắn muốn xóa Page này?"))
		location.href='{$smarty.const.base_admin}?act=edit-group&do=del&id='+id;
}
</script>
 <!-- BEGIN PAGE CONTAINER-->
         
    <link rel="stylesheet" href="{$smarty.const.base_admin}assets/bootstrap-toggle-buttons/static/stylesheets/bootstrap-toggle-buttons.css" />
	<script src="{$smarty.const.base_admin}js/jquery-1.8.2.min.js"></script>
   <!-- ie8 fixes -->
   <!--[if lt IE 9]>
   <script src="js/excanvas.js"></script>
   <script src="js/respond.js"></script>
   <![endif]-->
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/bootstrap-toggle-buttons/static/js/jquery.toggle.buttons.js"></script>
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/chosen-bootstrap/chosen/chosen.jquery.min.js"></script>
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/clockface/js/clockface.js"></script>
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/bootstrap-daterangepicker/date.js"></script>
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/bootstrap-daterangepicker/daterangepicker.js"></script>
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
   <script type="text/javascript" src="{$smarty.const.base_admin}assets/bootstrap-timepicker/js/bootstrap-timepicker.js"></script>
		 <div class="container-fluid">
            <!-- BEGIN PAGE HEADER-->   
            <div class="row-fluid">
               <div class="span12">
                   <!-- BEGIN THEME CUSTOMIZER-->
                   <div id="theme-change" class="hidden-phone">
                       <i class="icon-cogs"></i>
                        <span class="settings">
                            <span class="text">Theme Color:</span>
                            <span class="colors">
                                <span class="color-default" data-style="default"></span>
                                <span class="color-green" data-style="green"></span>
                                <span class="color-gray" data-style="gray"></span>
                                <span class="color-purple" data-style="purple"></span>
                                <span class="color-red" data-style="red"></span>
                            </span>
                        </span>
                   </div>
                   <!-- END THEME CUSTOMIZER-->
                  <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                   <h3 class="page-title">
                     {$nameact}
                   </h3>
                   
                   <!-- END PAGE TITLE & BREADCRUMB-->
               </div>
            </div>
            <!-- END PAGE HEADER-->
            <!-- BEGIN ADVANCED TABLE widget-->
			<div class="row-fluid">
			<form method="post">
			{$msg}
			<div class="span12">
				<div class="widget green">
					<div class="widget-title">
                        <h4><i class="icon-reorder"></i> Thông tin nhóm</h4>
                        <span class="tools">
                            <a href="javascript:;" class="icon-chevron-down"></a>
                            <a href="javascript:;" class="icon-remove"></a>
                        </span>
                    </div>
                    <div class="widget-body">
					{if $data.id neq ''}
						<div class="control-group">
							<label class="control-label" style="float: left;width: 200px;">ID</label>
                            <div class="controls" style="float:none;">
                                <input type="hidden" name="id" value="{$data.id}" />{$data.id}
                            </div>
                        </div>
					{/if}
						<div class="control-group">
                            <label class="control-label" style="float: left;width: 200px;">Nhóm thành viên</label> 
                            <div class="controls">
                                <input type="text" class="span6" name="name" value="{$data.name}" />
                            </div>
                        </div>
					</div>
				</div>
			<ul style="list-style-type: none;padding: 0px;margin: -4px;">
			{foreach from=$menu item=mn key=k}
			<li>
				<div class="span6" style="padding-left: 5px;">
					<div class="widget purple">
						<div class="widget-title">
							<h4><i class="icon-reorder"></i> {$k}</h4>
							<span class="tools">
								<a href="javascript:;" class="icon-chevron-down"></a>
								<a href="javascript:;" class="icon-remove"></a>
							</span>
						</div>
						
						<div class="widget-body">
						{foreach from=$mn item=ht}
						{if $ht neq '1' and $ht neq '2'}
							<div class="control-group">
								<div class="controls">
									<div class="normal-toggle-button" style="float:left;margin-right:5px;">
									<input type="checkbox" name="ht[{$ht.parentid}][{$ht.id}]" {$ht.ischeck}>
									</div>
									<label class="control-label">{$ht.name} </label>
								</div>
							</div>
						{/if}
						{/foreach}
						</div>
					</div>
				</div>
			</li>
			{/foreach}
			<li>
				<div class="span6" style="padding-left: 5px;">
				</div>
			</li>
			<li>
				<div class="span6" style="padding-left: 5px;">
					<div class="widget purple">
						<div class="widget-title">
							<h4><i class="icon-reorder"></i> Phần quyền chuyên mục</h4>
							<span class="tools">
								<a href="javascript:;" class="icon-chevron-down"></a>
								<a href="javascript:;" class="icon-remove"></a>
							</span>
						</div>
						
						<div class="widget-body form">
						{foreach from=$box item=bx}
							<div class="control-group">
								<div class="controls">
									<div class="normal-toggle-button" style="float:left;margin-right:5px;">
										<input type="checkbox" name="mn[{$bx.id}]" {$bx.ischeck}>
									</div>
									<label class="control-label">{$bx.name} </label>
								</div>
							</div>
						{/foreach}
						</div>
					</div>
				</div>
			</li>
			<li>
				<div class="span6" style="padding-left: 5px;">
					<div class="widget purple">
						<div class="widget-title">
							<h4><i class="icon-reorder"></i> Phân quyền trang</h4>
							<span class="tools">
								<a href="javascript:;" class="icon-chevron-down"></a>
								<a href="javascript:;" class="icon-remove"></a>
							</span>
						</div>
						
						<div class="widget-body form">
						{foreach from=$page item=pg}
							<div class="control-group">
								<div class="controls">
									<div class="normal-toggle-button" style="float:left;margin-right:5px;">
										<input type="checkbox" name="mn[{$pg.id}]" {$pg.ischeck}>
									</div>
									<label class="control-label">{$pg.name} </label>
								</div>
							</div>
						{/foreach}
						</div>
					</div>
				</div>
			</li>
			</ul>
			</div>
			</div>
			<div class="row-fluid">
				
				
			</div>
			<div class="row-fluid">
			<div class="span12">
			<div class="widget purple">
				<div class="form-actions">
                                    <button type="submit" class="btn blue" name="save" value="save"><i class="icon-ok"></i> Save</button>
                                    {if $data.id neq ''}<button type="button" class="btn" onclick="delmn({$data.id})"><i class=" icon-remove"></i> Xóa nhóm</button>{/if}
									<button type="button" class="btn" onclick="location.href='{$smarty.const.meta}?act=group'"><i class="icon-chevron-left"></i> Trở về</button>
                                </div>
								</form>
			</div>
			</div>
			</div>
            <!-- END ADVANCED TABLE widget-->
         </div>
         <!-- END PAGE CONTAINER-->
		    <script src="{$smarty.const.base_admin}js/form-component.js"></script>